home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / editors / AME / Rexx / test_external.ame < prev    next >
Encoding:
Text File  |  1994-02-01  |  689 b   |  35 lines

  1. /* $VER: test_external 37.1 (21.2.93) */
  2. /* Program to demonstrate the AME externally */
  3. /* controlled buffer */
  4.  
  5. if (~show('L','rexxsupport.library')) then do
  6.     addlib('rexxsupport.library',0,-30,0)
  7.     end
  8.  
  9. 'setprefs' eport WEDGEPORT
  10. 'setprefs' ext
  11. mp = openport(WEDGEPORT)
  12.  
  13. do forever
  14.    if quitflag = 1 then leave
  15.    t = waitpkt(WEDGEPORT)
  16.  
  17.    do ff = 1
  18.      p = getpkt(WEDGEPORT)
  19.     if c2d(p) = 0 then leave ff
  20.       line = getarg(p)
  21.  
  22.     parse var line command code f n .
  23.     k= x2d(code)
  24.     if code = 71 then quitflag = 1
  25.     else do
  26.         if ((k > 64) & (k < 91)) | ((k > 96) & (k < 123)) then k = k+1
  27.         'executekey' f n k
  28.         end
  29.     t=reply(p,0)
  30.     end
  31.     end
  32.  
  33. 'unsetprefs' ext
  34. 'unsetprefs' EPORT
  35.